package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.BaseFruitMoveMapper;
import com.ruoyi.base.domain.BaseFruitMove;
import com.ruoyi.base.service.IBaseFruitMoveService;

/**
 * 果品出入库记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-21
 */
@Service
public class BaseFruitMoveServiceImpl implements IBaseFruitMoveService 
{
    @Autowired
    private BaseFruitMoveMapper baseFruitMoveMapper;

    /**
     * 查询果品出入库记录
     * 
     * @param id 果品出入库记录主键
     * @return 果品出入库记录
     */
    @Override
    public BaseFruitMove selectBaseFruitMoveById(Long id)
    {
        return baseFruitMoveMapper.selectBaseFruitMoveById(id);
    }

    /**
     * 查询果品出入库记录列表
     * 
     * @param baseFruitMove 果品出入库记录
     * @return 果品出入库记录
     */
    @Override
    public List<BaseFruitMove> selectBaseFruitMoveList(BaseFruitMove baseFruitMove)
    {
        return baseFruitMoveMapper.selectBaseFruitMoveList(baseFruitMove);
    }

    /**
     * 新增果品出入库记录
     * 
     * @param baseFruitMove 果品出入库记录
     * @return 结果
     */
    @Override
    public int insertBaseFruitMove(BaseFruitMove baseFruitMove)
    {
        baseFruitMove.setCreateTime(DateUtils.getNowDate());
        return baseFruitMoveMapper.insertBaseFruitMove(baseFruitMove);
    }

    /**
     * 修改果品出入库记录
     * 
     * @param baseFruitMove 果品出入库记录
     * @return 结果
     */
    @Override
    public int updateBaseFruitMove(BaseFruitMove baseFruitMove)
    {
        return baseFruitMoveMapper.updateBaseFruitMove(baseFruitMove);
    }

    /**
     * 批量删除果品出入库记录
     * 
     * @param ids 需要删除的果品出入库记录主键
     * @return 结果
     */
    @Override
    public int deleteBaseFruitMoveByIds(Long[] ids)
    {
        return baseFruitMoveMapper.deleteBaseFruitMoveByIds(ids);
    }

    /**
     * 删除果品出入库记录信息
     * 
     * @param id 果品出入库记录主键
     * @return 结果
     */
    @Override
    public int deleteBaseFruitMoveById(Long id)
    {
        return baseFruitMoveMapper.deleteBaseFruitMoveById(id);
    }
}
